public class Test {
    //创建静态  对象
    private static Test instance = new Test();
    //构造方法私有化
    private Test() {

    }
    //构造静态方法，获取对象
    public static Test getInstance() {
        return instance;
    }

}
